home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
clang
/
tcplusx.zip
/
KEYBOARD.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-02-28
|
3KB
|
140 lines
#ifndef _KEYBOARD_H
#define _KEYBOARD_H
//
// keyboard.h - header file for class Keyboard
// Author - Robin W. McKean
// Last Update - February 21,1991
// Copyright (C) 1991 All rights reserved
//
// This file remains the property of the author, Robin W. McKean. You are
// free to use and change it as you see fit. This module, nor its object
// code, may not however be included in any packaged software without the
// written consent of the author.
//
// Contents ----------------------------------------------------------------
//
// Keyboard
//
// Description
//
// Defines the class Keyboard. The purpose of this class is to serve
// as an input class for recieving information from the keyboard, and
// turning that information into useful events
//
// End ---------------------------------------------------------------------
// Interface Dependencies ---------------------------------------------------
#ifndef _IOSTREAM_H
#include <iostream.h>
#define _IOSTREAM_H
#endif
#ifndef _GEN_H
#include <gen.h>
#endif
#ifndef _USETYPES_H
#include <usetypes.h>
#endif
#ifndef _OBJECT_H
#include <object.h>
#endif
#ifndef _EVENT_H
#include <event.h>
#endif
#ifndef _DEVICE_H
#include <device.h>
#endif
// End Interface Dependencies ------------------------------------------------
// Class //
class Keyboard : public Device
{
public:
Keyboard( int initStatus = D_ON );
Keyboard( Keyboard& );
~Keyboard( void );
classType isA( ) const;
char *nameOf( ) const;
int processA( Event& );
void pollDevice( );
private:
int altKeyStatus;
unsigned char enhancedBIOS;
unsigned int breakStatus;
};
// Description --------------------------------------------------------------
//
// Defines the keyboard class that will be used to gather input information
// from the keyboard, translate that into usable information, and send
// this information to the EventManager. This object cannot work
// without the event manager
//
// Constructor
//
// Keyboard( int initStatus = D_ON )
//
// Initializes the device, and determines its initial status. It also
// disables the control break button.
//
// Keyboard( Keyboard& )
//
// Copy constructor, copies one device into another. In this case, we
// don't do anything, because the constructor initializes everything
//
// Destructor
//
// ~Keyboard()
//
// Resets the control break status
//
// Member Functions
//
// isA( )
//
// Returns character class type keyboardClass
//
// nameOf( )
//
// Returns a character representation of class, "Keyboard"
//
// printOn( ostream& )
//
// Prints the contents of the class in a logical fashion
//
// processA( Event& )
//
// Responsible for taking an event, and processing the contents if
// applicable to this device
//
// pollDevice( )
//
// Requests information from a device, and translated into an event
// which is fed directly into the event manager's queue.
//
// Inherited Members
//
// isSortable( ) inherited from Object
// isAssociation( ) inherited from Object
// operator new inherited from Object
// firstThat( ) inherited from Object
// lastThat( ) inherited from Object
// hashValue( ) inherited from Device
// isEqual( ) inherited from Device
//
// End Description ----------------------------------------------------------
#endif // _KEYBOARD_H //